Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go: Rename "named type" to "defined type" #18489

Merged
merged 6 commits into from
Feb 14, 2025

Conversation

owen-mc
Copy link
Contributor

@owen-mc owen-mc commented Jan 14, 2025

No description provided.

@github-actions github-actions bot added the Go label Jan 14, 2025
@owen-mc owen-mc force-pushed the go/rename-namedtype-definedtype branch 4 times, most recently from 228de09 to b5b8857 Compare January 14, 2025 14:22
@owen-mc owen-mc force-pushed the go/rename-namedtype-definedtype branch from b5b8857 to 9d8ee08 Compare February 12, 2025 11:30
@owen-mc owen-mc force-pushed the go/rename-namedtype-definedtype branch from 9d8ee08 to 6aa57e1 Compare February 13, 2025 15:22
@owen-mc owen-mc force-pushed the go/rename-namedtype-definedtype branch from 6aa57e1 to f9a87cd Compare February 13, 2025 16:20
@owen-mc owen-mc marked this pull request as ready for review February 13, 2025 16:22
@Copilot Copilot bot review requested due to automatic review settings February 13, 2025 16:22
@owen-mc owen-mc requested a review from a team as a code owner February 13, 2025 16:22

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This pull request refactors terminology by replacing references to "named type" with "defined type" throughout the codebase and documentation. Key changes include updated change notes, modified error messages, updated comment texts and labels in type extraction logic, and corresponding updates in database schema definitions.

Changes

File Description
go/ql/lib/change-notes/2025-02-12-deprecate-namedtype.md Updates change notes to deprecate NamedType in favor of DefinedType
go/extractor/extractor.go Updates comments, error messages, and logic to use DefinedType instead of NamedType
go/extractor/dbscheme/tables.go Renames tables and updates comments from NamedType to DefinedType
go/extractor/trap/labels.go Updates variable names and function logic to reflect DefinedType

Copilot reviewed 34 out of 34 changed files in this pull request and generated no comments.

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

Copy link
Member

@mbg mbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broadly looks good. I only have a couple of comments.

I initially thought that maybe cases where we change which class another extends from (e.g. ComparableType) might be a breaking change, but I think you avoided that by keeping NamedType around as an alias for DefinedType. Just noting that here for reference.

@owen-mc owen-mc force-pushed the go/rename-namedtype-definedtype branch from dc4e11c to 1a52398 Compare February 13, 2025 21:59
@owen-mc
Copy link
Contributor Author

owen-mc commented Feb 14, 2025

@mbg Thanks for catching the unedited upgrade scripts - I had to regenerate them and forgot to fix them. I've updated the comment too.

I also ran DCA, just in case I messed something up when updating the stats file, and it showed no significant variation in anything.

Copy link
Member

@mbg mbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me now!

@owen-mc owen-mc merged commit d8fe4d2 into github:main Feb 14, 2025
19 checks passed
@owen-mc owen-mc deleted the go/rename-namedtype-definedtype branch February 14, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants